function lessthanTwo(){
    return 6;
}
function betweenTwoAndEight(distance){
    return 6+0.8*(distance-2);
}
function morethanEight(distance){
    return 10.8+1.2*(distance-8);
}
function waitingprice(waitingTime){
    return 0.25*waitingTime;
}
module.exports = function main(distance,waitingTime) {
    if(distance<2){
        return Math.round(lessthanTwo() + waitingprice(waitingTime));
    }
    else if(distance>8){
        return Math.round(morethanEight(distance) + waitingprice(waitingTime));
    }
    else{
        return Math.round(betweenTwoAndEight(distance) + waitingprice(waitingTime));
    }
};